package com.hqyj.onlineExamination.modules.exam.entity;

import com.hqyj.onlineExamination.modules.common.entity.AbstractEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;

@Entity
@Table(name = "exam_paper")
public class Paper extends AbstractEntity {
    //总分数
    public final static double DEFAULT_TOTAL_SCORE = 100;
    private String subject;
    //总时间
    private Integer totalTime;
    //分数
    private Double totalScore;
    //类型
    @Transient
    private String paperType;
    @Transient
    private List<Question> questions;

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public Integer getTotalTime() {
        return totalTime;
    }

    public void setTotalTime(Integer totalTime) {
        this.totalTime = totalTime;
    }

    public Double getTotalScore() {
        return totalScore;
    }

    public void setTotalScore(Double totalScore) {
        this.totalScore = totalScore;
    }

    public List<Question> getQuestions() {
        return questions;
    }

    public void setQuestions(List<Question> questions) {
        this.questions = questions;
    }

    public String getPaperType() {
        return paperType;
    }

    public void setPaperType(String paperType) {
        this.paperType = paperType;
    }

    @Override
    public String toString() {
        return "Paper{" +
                "subject='" + subject + '\'' +
                ", totalTime=" + totalTime +
                ", totalScore=" + totalScore +
                ", paperType='" + paperType + '\'' +
                ", questions=" + questions +
                '}';
    }
}

